package cn.com.bluemoon.daps.standard.vo;

import cn.com.bluemoon.daps.standard.entity.DapSystemCategory;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author Jarod.Kong
 */

@ApiModel(description = "主题或分类的编辑接收器")
@Setter
@Getter
@ToString
public class TopicCategoryVo extends TopicCategoryBaseVo {

    private String topicCategoryId;

    public TopicCategoryVo() {
        super();
    }

    public TopicCategoryVo(DapSystemCategory systemCategory) {
        super(systemCategory);
        this.topicCategoryId = systemCategory.getId();
    }

    @Override
    public DapSystemCategory toModel() {
        DapSystemCategory category = super.toModel();
        category.setId(this.topicCategoryId);
        return category;
    }
}
